import request from '@/utils/request'

export function getProjectInfo(data) {
  return request({
    url: 'api/ProjectInfo/Get',
    method: 'post',
    data
  })
}

export function addProjectInfo(data) {
  return request({
    url: 'api/ProjectInfo/Create',
    method: 'post',
    data
  })
}

export function modifyProjectInfo(data) {
  return request({
    url: 'api/ProjectInfo/Update',
    method: 'post',
    data
  })
}

export function delProjectInfo(id) {
  return request({
    url: 'api/ProjectInfo/Delete',
    method: 'post',
    params: {
      projectId: id
    }
  })
}
export function finishProject(id) {
  return request({
    url: 'api/ProjectInfo/Finish',
    method: 'post',
    params: {
      projectId: id
    }
  })
}

export function uploadExcelFile(file) {
  var fd = new FormData();
  fd.append('file', file);
  return request({
    url: 'api/ProjectInfo/ExcelUpload',
    method: 'post',
    data: fd
  })
}

export function uploadExcelDataSeve(data) {
  return request({
    url: 'api/ProjectInfo/ProjectSave',
    method: 'post',
    data
  })
}
